Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Device Communications Messages


GXFreeBuffer

QuickDraw GX sends the GXFreeBuffer message when waiting for the completion of a buffer that has been sent with the GXDumpBuffer message. You can override the GXFreeBuffer message if you are processing data and buffers in your own way. Your override of the GXFreeBuffer message must match the following formal declaration:

OSErr MyFreeBuffer (gxPrintingBufferPtr *aPrintingBuffer);
aPrintingBuffer
A pointer to the printing buffer structure that defines the buffer to wait for.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
The default implementation of the GXFreeBuffer message waits for processing of the buffer to complete using PAP, serial, or not-connected communications. It calls the asynchronous I/O functions of the Macintosh system software to wait for the buffer to complete transmission to the device. QuickDraw GX sends this message when it needs
a buffer and they are all full.

You can override this message if you are processing data and buffers in your own way. You must not return from this message until the I/O completes or terminates with an error.

SPECIAL CONSIDERATIONS
You can send the GXFreeBuffer message yourself if you are implementing your own buffering scheme.

If you override the GXDumpBuffer message, you must also override the GXFreeBuffer message.

If you are implementing your own I/O mechanism, you need to perform a total override of the GXFreeBuffer message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
The default implementation of the GXFreeBuffer message can also return the communications errors that are listed in Table 4-2 on page 4-42.

SEE ALSO
The GXDumpBuffer message is described in the previous section.

The printing buffer structure is described on page 4-11.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help